<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="{$smarty.const.ADMIN_CSS_PATH}style.css" rel="stylesheet" type="text/css" />
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="{$smarty.const.__MODULE__}/index/main">首页</a></li>
    <li><a href="{$smarty.const.__CONTROLLER__}/goalstore">商品列表</a></li>
    <li>修改商品信息	</li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>基本信息</span></div>
    <form action="{$smarty.const.__SELF__}" method="post" enctype="multipart/form-data">
    <ul class="forminfo">
    <li style="display: none;"><label>商品id</label><input name="id" value="{$info.id}" id="id" type="text" class="dfinput" /></li>
    <li><label>商品名称</label><input name="name" id="name" type="text" class="dfinput" value="{$info.name}"/></li>
    <li><label>商品价格</label><input name="price" id="price" type="text" class="dfinput" value="{$info.price}" /></li>
    <li><label>商品原价</label><input name="ori_price" id="ori_price" type="text" class="dfinput"  value="{$info.ori_price}"/></li>
    <li><label>商品属性:</label>  
    <select class="select3" name="type" id="type">
    <option value="1" selected="selected">普通商品</option>
    <option value="2" {if $info.type==2}selected="selected"{/if}>积分商品</option>
    </select>
    </li>
    <li><label>商品分类:</label>  
    <select class="select3" name="cat_uid" id="cat_uid">
    <!--<option value="1" selected="selected">上架</option>-->
     <option value="0" selected="selected">无</option>
    {foreach $cats as $k=>$v}
    <option value="{$v.uid}" {if $v.uid==$info.cat_uid}selected="selected"{/if}>{$v.title}</option>
    {/foreach}
    </select>
    </li>
    <li><label>剩余数量</label><input name="count" id="count" type="text" class="dfinput"  value="{$info.count}"/></li>
    <li><label>商品销量</label><input name="salecount" id="salecount" type="text" class="dfinput"  value="{$info.salecount}"></li>
    <li><label>排序值</label><input name="sort" id="sort" type="text" class="dfinput"  value="{$info.sort}"></li>
    <li><label>运费</label><input name="delivery_fee" id="delivery_fee" type="text" class="dfinput" value="{$info.delivery_fee}"></li>
    <li><label>购买限制</label><input name="buy_limit" id="buy_limit" type="text" class="dfinput" value="{$info.buy_limit}"></li>
    <li class="showimg"><label>当前图片</label><span><img src="{$info.main_img}" style="width: 168px;height: 126px;"/></span></li>
    <li><label>上传图片</label><input name="main_img" id="main_img" type="file" /><i>推荐大小640*360</i></li>
    <li><label>商品详情</label><textarea name="detail" id="detail" cols="" rows=""  value="{$info.detail}"  style="overflow-y:scroll;overflow-x:scroll;" placeholder="如：1.描述描述描述。。。</br>" class="textinput"></textarea><i>转行处请加英文&lt;/br&gt;</i></li>
    <li><label>商品状态</label><cite><input name="status" type="radio" value="1" checked="checked" />上架&nbsp;&nbsp;&nbsp;&nbsp;<input name="status" type="radio" value="0" {if $info.status==0}checked="checked"{/if}/>下架</cite></li>
    <li><label>&nbsp;</label><input type="submit" class="btn" value="确认保存"/></li>
    </ul>
    </form>
    
    </div>
    <script type="text/javascript" src="{$smarty.const.ADMIN_JS_PATH}jquery.js"></script>
    <script type="text/javascript">
    	$('#main_img').change(function(){ //预览图片
		  var src=window.URL.createObjectURL(document.getElementById('main_img').files[0]);
		  $('.showimg img').attr('src',src);
		});
    </script>
</body>
</html>
